﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class ShadowCtrl : MonoBehaviour
{
    public Vector3 delta;
    // Use this for initialization
    public SpriteRenderer pa;
    void Start()
    {
        delta = new Vector3(0.17f, -0.19f, 0);
        pa = transform.parent.GetComponent<SpriteRenderer>();
        GetComponent<SpriteRenderer>().sortingOrder = pa.sortingOrder - 1;
    }

    // Update is called once per frame
    void Update()
    {
        transform.rotation = pa.transform.rotation;
        transform.position = pa.transform.position + delta;
    }
}
